package main

import (
    "os"
    "encoding/gob"
    "fmt"
)

type Student struct {
    Name string
    Age  int
}




func main() {

    f, err := os.Open("1.gob")
    if err != nil {
        return 
    }
    defer f.Close()

    decoder := gob.NewDecoder(f)

    var s Student

    decoder.Decode(&s)
    fmt.Println(s)
}
